package pattern.adapter;

/*
 * @author changfei
 * @date  2023/11/28 14:58
 * @description 适配器220-5 对象适配器
 */
public class PowerAdapter implements DC {

    private Power power;

    public PowerAdapter(Power power) {
        this.power = power;
    }

    @Override
    public void ouput5() {
        power.output();
        System.out.println("转5V");

    }

    public static void main(String[] args) {
        PowerAdapter powerAdapter = new PowerAdapter(new AC220());
        powerAdapter.ouput5();
    }
}
